<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>支付结果</title>
    <!--<link rel="stylesheet" href="http://weui.github.io/weui/weui.css?v=201609" />-->
    <link rel="stylesheet"  type="text/css" href="http://cdn.bootcss.com/weui/0.4.2/style/weui.min.css">

</head>
<script type="text/javascript">
//    $(document).ready(function(){

        window.onload=function(){
                    {if !empty($reply['ad_link'])&&$dsreply['is_openbbm']!=1&&$bpreply['isbp']!=1}
                    setTimeout('location.href = "{$reply['ad_link']}"',2000);
                    {/if}
        }

//    })

</script>
<body>
<div class="msg">
<div class="weui_msg">
    <div class="weui_icon_area "><i class="weui_icon_success weui_icon_msg"></i></div>
    <div class="weui_text_area">
        {if $dsreply['is_openbbm']==1}
        <p class="weui_msg_title" style="margin-bottom: 20px;">感谢打赏！</p>
        {else if $bpreply['isbp']==1&&$order['pay_type']=2}
        <p class="weui_msg_title" style="margin-bottom: 20px;">霸屏成功！</p>
        {else if $bpreply['isbp']==1&&$order['pay_type']=3}
        <p class="weui_msg_title" style="margin-bottom: 20px;">打赏成功！</p>
        {else if $bphb['isfanshb']==1&&$order['pay_type']=4}
        <p class="weui_msg_title" style="margin-bottom: 20px;">红包发送成功！</p>
        {else}
        <p class="weui_msg_title" style="margin-bottom: 20px;">支付成功！!</p>
        {/if}
        <h2 class="weui_msg_title weui_btn weui_btn_primary" onclick="is_close()" style="color: #fff;margin-top: 25px;">确定</h2>

    </div>
    <div class="weui_extra_area">
       {$_W['account']['name']}
    </div>
</div>
</div>
<script type="text/javascript" charset="utf-8" src="{$_W['siteroot']}/addons/haoman_base/base/zepto.min.js"></script>
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">
    wx.config({
        debug:false,
        appId: '{$package["appId"]}',
        timestamp: '{$package["timestamp"]}',
        nonceStr: '{$package["nonceStr"]}',
        signature: '{$package["signature"]}',
        jsApiList: [
            'checkJsApi','getLocation','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareWeibo'
        ]
    });
    var sharedata = {
        "imgUrl" : "{$shareimg}",
        "link" : "{$sharelink}",
        "desc" : "{$sharedesc}",
        "title" : "{$sharetitle}"
    };

    wx.ready(function () {
       // wx.showOptionMenu();
        wx.hideOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareQZone(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareWeibo(sharedata);
    });

</script>

<script>
    function is_close() {
        {if $dsreply['is_openbbm']==1}
        location.href = "{$_W['siteroot']}{php echo $this->createMobileUrl('dsindex', array('id' => $dsreply['rid']))}";
        return false;
        {else if $bpreply['isbp']==1||$bphb['isfanshb']==1||$bpreply['isds']==1||$bpreply['isvo']==1}
        location.href = "{$_W['siteroot']}app/{php echo $this->createMobileUrl('messagesindex', array('id' => $bpreply['rid']))}";
        return false;
        {else}
        {if empty($reply['ad_link'])}
        WeixinJSBridge.invoke('closeWindow',{},function(res){});
        return false;
        {else}
        location.href = "{$reply['ad_link']}";
        {/if}
        {/if}

    }

</script>
</body>
</html>
